﻿using System;
using System.Web.Mvc;
using AcademicPlanner.Framework.Helpers;

namespace AcademicPlanner.Presentation
{
	/// <summary>
	/// ViewMaster is the base class for all master pages in the AcademicPlanner application.
	/// It encapsulates common master page functionality such as translation of string messages.
	/// </summary>
	/// <version>1.0</version>
	/// <since>1.0</since>
	public abstract class ViewMaster : ViewMasterPage
	{
		/// <summary>
		/// Translates a string message from the application's source language to its current
		/// target language read from the session. This method is a convenience wrapper of
		/// <see cref="M:AcademicPlanner.Framework.Helpers.TranslationHelper.Translate"/> 
		/// for <code>ViewMaster</code> objects.
		/// </summary>
		/// <param name="pText">The message to translate.</param>
		/// <returns>The translated message.</returns>
		/// <seealso cref="M:AcademicPlanner.Framework.Helpers.TranslationHelper.Translate"/>
		/// <version>1.0</version>
		/// <since>1.0</since>
		public string Tr(string pText)
		{
			return TranslationHelper.Translate(pText, "Presentation");
		}
	}
}
